﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace NJL.WebUsers.Controls
{
    public partial class WUCFooter : BaseUserControl
    {
        private readonly BLL.NJL_SYS_BASE bll = new BLL.NJL_SYS_BASE();
        protected string WEBSITE_INSERT_CODE = "";
        private readonly BLL.NJL_FRIENDLINK bllFriendLink = new BLL.NJL_FRIENDLINK();
        DataSet ds;
        protected void Page_Load(object sender, EventArgs e)
        {
            Model.NJL_SYS_BASE model = bll.GetModel(WEBSITE_CODE);

            if (model != null)
            {
                WEBSITE_INSERT_CODE = model.WEBSITE_INSERT_CODE;
            }
            if (!IsPostBack)
            {
                ds = bllFriendLink.GetList(20, "NJL_SYS_BASE_ID='" + WEBSITE_CODE + "'", "SORT desc,CREATE_DATE_TIME desc");
                rptFriendLink.DataSource = ds;
                rptFriendLink.DataBind();
            }
        }
    }
}